import { SignInButton } from '@clerk/nextjs'
import { Button } from 'antd'
import { usePathname } from 'next/navigation'

export default function TriggerComponent() {
  const pathname = usePathname()
  return (
    <SignInButton
      mode="modal"
      fallbackRedirectUrl={pathname}
      signUpForceRedirectUrl={pathname}
      signUpFallbackRedirectUrl={pathname}
    >
      <Button aria-label="Guest Login">SignIn</Button>
    </SignInButton>
  )
}
